/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const router = {
  path: '/user',
  component: Layout,
  name: 'store',
  meta: {
    title: '用户管理',
    icon: 'orders'
  },
  children: [
    {
      path: 'customerList',
      component: () => import('@/views/user/customer/customerList'),
      name: 'customerList',
      meta: {
        title: '客户管理'
      }
    },
    {
      path: 'customerDetail/:id',
      hidden: true,
      component: () => import('@/views/user/customer/customerDetail'),
      name: 'customerDetail',
      meta: {
        activeMenu: '/user/customerList',
        title: '客户详情'
      }
    },
    {
      path: 'supplierList',
      component: () => import('@/views/user/supplier/supplierList'),
      name: 'supplierList',
      meta: {
        title: '供应商管理'
      }
    },
    {
      path: 'supplierDetail/:id',
      hidden: true,
      component: () => import('@/views/user/supplier/supplierDetail'),
      name: 'supplierDetail',
      meta: {
        activeMenu: '/user/supplierList',
        title: '供应商详情'
      }
    },
    {
      path: 'departmentList',
      component: () => import('@/views/user/department/departmentList'),
      name: 'departmentList',
      meta: {
        title: '内部员工管理'
      }
    },
    {
      path: 'departmentDetail/:id',
      hidden: true,
      component: () => import('@/views/user/department/departmentDetail'),
      name: 'departmentDetail',
      meta: {
        activeMenu: '/user/departmentList',
        title: '员工详情'
      }
    }
  ]
}
export default router
